library(raster)
source('https://raw.githubusercontent.com/oharac/src/master/R/common.R')
source(here('common_fxns.R'))
library(animation)
reload <- FALSECreate a species richness map for threatened marine species.
Combine taxa-level impact maps to create maps of number of threatened species impacted per cell, per year.
Plot maps as animated rasters, both by absolute numbers of species impacted in a location and by proportion of species (impact counts / species richness).
This is all done at the level of cumulative impact category, not individual stressors.
Set up the dataframe of species to include. By taxon, load all species range maps, smash down to taxon-level species richness; then combine these for a total species richness.
For each combination of climate/no climate and impacts/refugia:
calc(fun = sum, na.rm = TRUE)Just showing year 2013.